package com.murphy.log.dao.impl;

import com.murphy.log.bean.Log;
import com.murphy.log.dao.LogMapper;
import com.murphy.utils.AbstractBaseDao;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Author Murphy
 * @Date 2018-01-15 14:35
 */
@Repository
public class LogMapperImpl extends AbstractBaseDao implements LogMapper {
    @Override
    public int insert(Log log) {
        return this.getSqlSession().insert("com.murphy.log.dao.LogMapper.insertLog",log);
    }

    @Override
    public int updateLog(Log log) {
        return this.getSqlSession().update("com.murphy.log.dao.LogMapper.updateLog",log);
    }

    @Override
    public int getLogListCount(Map<String, Object> map) {
        return this.getSqlSession().selectOne("com.murphy.log.LogMapper.getLogListCount",map);
    }

    @Override
    public List<Log> getLogListPage(Map<String, Object> map) {
        return this.getSqlSession().selectList("com.murphy.log.LogMapper.getLogListPage",map);
    }
}
